<!DOCTYPE>
<html>
<head>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>游戏</title>
<%@ include file="../common/home_head.jsp"%>
<style>
	#search{
		width:35% ; 
		float:right;
		margin-top:1%;
	}
	#search input[type="text"]{
		background:#FFF;
	}
</style>
</head>
<body style="background:#FFF;">
<script type="text/javascript">
$(document).ready(function(){
	$("#nav li").removeClass("active");
	$("#nav>li").eq(3).addClass("active");
});
</script>
	<div class="sub-banner">
		<%@ include file="../common/navbar.jsp"%>
	</div>
	<c:if test="${!empty news }">
		<div class="events-w3layouts">
			<h2>News</h2>
			<div class="col-md-7 events-left-agile-agileits-w3layouts">
				<c:forEach items="${news }" var="n" end="0">
					<a href="${pageContext.request.contextPath }/getSalesDetail?gid=${n.salesId}">
					<div class="events-text-w3-agile events-text1">
						<h4><fmt:formatDate value="${n.salesDate }" pattern="yyyy-MM-dd"/></h4>
						<p>${n.salesName }</p>
						<ul>
							<li>by ${n.developer.devName }</li>
							<li><span class="glyphicon glyphicon-heart"
								aria-hidden="true"></span> ${n.salesHot }</li>
						</ul>
					</div>
				</a>
				</c:forEach>
			</div>

			<div class="col-md-5 events-right-agile">
				<c:forEach items="${news }" var="n1" begin="1" end="1">
					<a href="${pageContext.request.contextPath }/getSalesDetail?gid=${n1.salesId}">
					<div class="events-right-top">
						<div class="events-text-w3-agile events-text2">
							<h4><fmt:formatDate value="${n1.salesDate }" pattern="yyyy-MM-dd"/></h4>
							<p>${n1.salesName }</p>
							<ul>
								<li>by ${n1.developer.devName }</li>
								<li><span class="glyphicon glyphicon-heart"
									aria-hidden="true"></span> ${n1.salesHot }</li>
							</ul>
						</div>
					</div>
				</a> 
				</c:forEach>
				
				<c:forEach items="${news }" var="n3" begin="2" end="2">
					<a href="${pageContext.request.contextPath }/getSalesDetail?gid=${n3.salesId}">
					<div class="events-right-bottom">
						<div class="events-text-w3-agile events-text2">
							<h4><fmt:formatDate value="${n3.salesDate }" pattern="yyyy-MM-dd"/></h4>
							<p>${n3.salesName }</p>
							<ul>
								<li>by ${n3.developer.devName }</li>
								<li><span class="glyphicon glyphicon-heart"
									aria-hidden="true"></span> ${n3.salesHot }</li>
							</ul>
						</div>
					</div>
				</a>
				</c:forEach>
				<div class="clearfix"></div>
			</div>
			<div class="clearfix"></div>
		</div>
	</c:if>
	<div class="w3ls_search" id="search">
		<form action="#" method="post">
			<input type="text" name="key" placeholder="查找游戏" required="">
			<input type="submit" value=" ">
		</form>
	</div>
	<div class="events-section2-agileinfo">
		<div class="container">
			<c:if test="${!empty games }">
				<c:forEach items="${games }" var="g">
					<div class="blog2-w3ls">
				<div class="col-md-4 blog-image-w3l">
					<a href="${pageContext.request.contextPath }/getSalesDetail?gid=${g.salesId}"><img src="${pageContext.request.contextPath }/images/games/${g.salesImg}" alt="${g.salesName }"style="max-height:280px;max-width: 280px; vertical-align:middle;"/></a>
				</div>
				<div class="col-md-8 blog-text-w3ls">
					<a href="${pageContext.request.contextPath }/getSalesDetail?gid=${g.salesId}"><h4>${g.salesName }</h4></a>
					<div class="item_info">
						<ul>
							<li><a href="#"><i class="glyphicon glyphicon-user"></i>${g.developer.devName }</a></li>
							
							<li><i class="glyphicon glyphicon-tags"></i>${g.salesType.typeName }</li>
							
							<li><i class="glyphicon glyphicon-heart"></i>${g.salesHot }热度</li>

						</ul>
					</div>
					<p>${g.salesIntroduce}</p>
					<a href="${pageContext.request.contextPath }/getSalesDetail?gid=${g.salesId}" class="blog-read">查看更多</a>
				</div>
				<div class="clearfix"></div>
			</div>
				</c:forEach>
			</c:if>
		</div>
	</div>


	<%@ include file="../common/footer.jsp"%>
	<%@ include file="../common/loginModal.jsp" %>
</body>
</html>